package com.atguigu.gmall.item.all.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author atguigu-mqx
 */
@Controller
public class PassportController {

    //  http://passport.gmall.com/login.html?originUrl=http://www.gmall.com/
    //  跳转到登录页面！

    @GetMapping("login.html")
    public String loginIndex(HttpServletRequest request){
        //  获取到从哪里跳转到的url
        String originUrl = request.getParameter("originUrl");
        request.setAttribute("originUrl",originUrl);
        //  返回登录页面！
        return "login";
    }
}
